<template>
<div>
    <mt-header title="您的模板">

  <router-link  slot="right"  to="/">
    <mt-button class="btn">＋
   </mt-button>
   </router-link>
   </mt-header>
   <div>
   <ul style="list-style: none;"
  v-infinite-scroll="loadMore"
  infinite-scroll-disabled="loading"
  infinite-scroll-distance="10">
  <router-link to="/choujiang">
  <li class="wcdiv" v-for="(item,z) in list" :key="z">
  
      <div class="neiceone">
      <span>{{item.prize_name}}</span>
      <br>
      <span>{{item.prize_date.split(",")[0]}}</span>
        <br>
       <span>{{item.prize_date.split(",")[1]}}</span>
       </div>
       <div class="neicetwo">
      <router-link to="/jxpush"><mt-button class="btn1 xiugai" type="primary">修改</mt-button></router-link>
      <mt-button class="btn1" type="danger">删除</mt-button>
     <mt-button class="btn1" type="primary">复制</mt-button>
   
    </div>
  </li>
  </router-link>
</ul>
</div>
</div>
</template>
<style scoped>
.wcdiv{
  display:flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
 
  background: rgb(250, 250, 250);
  border-top: 1px solid rgb(239, 239, 239) ;
  border-bottom: 1px solid rgb(239, 239, 239) ;
}
a{
    text-decoration: none !important;
    color: #000;
}
router-link ,span{
    text-decoration: none !important;

}
.neiceone{

  margin-right: 6vw;
}
.neicetwo .btn1{
    margin: 0 1vw;
      
}
ul{
  padding: 0;
}
  div .btn{
  font-size: 30px;
} 

</style>
<script>
export default{
  data(){
    return{
      list:[]
    }
  },
   methods:{
loadMore() {
  this.loading = true;
  setTimeout(() => {
    let last = this.list[this.list.length - 1];
    for (let i = 1; i <= last; i++) {
      this.list.push(last + i);
    }
    this.loading = false;
  }, 1000);
}
},
mounted(){
  this.axios.get('http://pw.clianmaimai.com:8071/dn/select_prize?user_id=1').then(result=>{
    // console.log(result.data);
    this.list = result.data;
    console.log(result.data)
    })
}
}
</script>
